﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model;
using FG_Admin_DAL;

namespace FG_Admin_BLL
{
    public class NewsBLL
    {
        NewsDAL dal = new NewsDAL();
        /// <summary>
        /// 返回所有新闻信息
        /// </summary>
        /// <param name="PageIndex"></param>
        /// <param name="PageSize"></param>
        /// <returns></returns>
        public List<News> GetNews(int PageIndex, int PageSize)
        {
            return dal.GetNews(PageIndex, PageSize);
        }
        /// <summary>
        /// 返回新闻类别对应的新闻信息
        /// </summary>
        /// <param name="PageIndex"></param>
        /// <param name="PageSize"></param>
        /// <param name="NewsType">新闻类别</param>
        /// <returns></returns>
        public List<News> GetNews(int PageIndex, int PageSize, int NewsType)
        {
            return dal.GetNews(PageIndex, PageSize, NewsType);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="PageIndex"></param>
        /// <param name="PageSize"></param>
        /// <param name="Title">新闻标题</param>
        /// <param name="NewsType">新闻类别</param>
        /// <returns></returns>
        public List<News> GetNews(int PageIndex, int PageSize, string Title, int NewsType)
        {
            return dal.GetNews(PageIndex, PageSize, Title, NewsType);
        }  
        /// <summary>
        /// 添加新闻信息
        /// </summary>
        /// <param name="ss"></param>
        /// <returns></returns>
        public int AddNews(News ss)
        {
            return dal.AddNews(ss);
        }
    }
}
